/**
 * 定义几何体材质：
 * 物体存在三种反射率：环境反射系数、漫反射系数、镜面反射系数（环境反射系数和漫反射系数相同）
 * 物体材质反射率分为2种：共三个变量
 *      漫反射：材质反射率
 *      镜面反射： 
 *              镜面反射强度
 *              镜面反射光洁度
 * 
*/
export class Material{
    constructor(materialReflection, specularFactor = 0, shininess = 50 ){
        this.materialReflection = materialReflection;
        this.specularFactor = specularFactor;
        this.shininess = shininess;
    }
    get uniforms(){
        const uniforms = {};
        uniforms.materialReflection = { value: this.materialReflection }; 
        uniforms.specularFactor =  { value: this.specularFactor }; 
        uniforms.shininess =  { value: this.shininess }; 

        return {
            ...uniforms
        }
    }
}